package com.zpark.controller;

import com.zpark.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PackageName: com.zpark.controller
 * @ClassName: UserController
 * @Description:
 * @author: RZS
 * @date: 2024/4/16  10:01
 */
@RestController
@RequestMapping("producer")
public class UserController {

    @GetMapping("/get")
    public User getU(){
        User user = new User();
        user.setId(1);
        user.setUname("大锤GET");
        user.setPwd("123456");

        return user;
    }

    @PostMapping("/post")
    public User postU(){
        User user = new User();
        user.setId(2);
        user.setUname("锤锤GET");
        user.setPwd("789789");

        return user;
    }
}
